#coding:utf8

# 导入库
from fdfs_client.client import Fdfs_client

#创建客户端,需要加载配置文件,配置文件的tracker必须设置正确
client = Fdfs_client('配置文件路径')

#上传图片
client.upload_by_filename('路径')

#返回结果
# <fdfs_client.fdfs_protol.Tracker_header object at 0x7fd4be5e06d8>
# {'Group name': 'group1',
#  'Remote file_id': 'group1/M00/00/02/wKjlhVtFriWAACEbAAT-6_mSZR0307.jpg',
#  'Storage IP': '192.168.229.133',
#  'Status': 'Upload successed.',
#  'Local file name': '/home/python/Desktop/images/2.jpg',
#  'Uploaded size': '319.00KB'}

